//专门请求用户模块

import http from '../utils/request'

//获取验证码
export let getCaptchaApi = () => http.get('/users/getCaptcha?v=next') 

//检验验证码
export let verifyCaptchaApi = (captcha)=>http.get('/users/verifyCaptcha',{
    params:{
        captcha
    }
})
//常规用户名登录
export let loginApi = (username,password) => http.post('/users/login',{
    username,
    password
})
//获取二维码地址
export let getQrCodeApi = sid => http.get('/users/getQrcode',{
    params:{
        sid
    }
})
//微信登录
export let wechatLoginApi = wechatCode =>http.get('/users/wechatLogin',{
    params:{
        wechatCode
    }
})
//修改用户信息
// export let qqq = () =>http.post("/users/updateUser")

//获取手机验证码
export let getSmsCodeApi = (phoneNumber)=>http.post('/sms/send',{phoneNumber})

//手机验证码登录
export let smsLoginApi = (code)=>http.post('/users/login?type=sms',{code})
